<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

<body>

    <div id="box">555</div>

    <input type="checkbox">选择

</body>

</html>
<script>
    //获取到div的dom对象
    var ele = document.querySelector("#box");
    //为box设置style属性
    ele.style.color = "red";
    ele.style.backgroundColor = "green";
    ele.style.display = "none";

    var inp = document.querySelector("input");

    //alert(inp.checked);
    inp.checked = true;


</script>